﻿using System;
using System.Text.RegularExpressions;

class WorkExtractor
{
    static void Main()
    {
        string target = "test";
        string text = "Testing is important. We need to test everything";
        FindAllMatches(text, target);
    }

    private static void FindAllMatches(string text, string target)
    {
        var hits = Regex.Matches(text, @"[\w]*" + target + @"[\w]*", RegexOptions.IgnoreCase);
        foreach (var hit in hits)
        {
            Console.WriteLine(hit);
        }
    }
}

